package com.mdd.common.validate.card;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.validation.constraints.*;

@Data
@ApiModel("卡片创建参数")
public class CardCreateValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "会员姓名不能为空")
    @ApiModelProperty(value = "会员姓名")
    private String fullName;

    @NotNull(message = "手机号不能为空")
    @ApiModelProperty(value = "手机号")
    @NotEmpty(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String mobile;

    @NotNull(message = "充值金额不能为空")
    @ApiModelProperty(value = "充值金额")
    private BigDecimal rechargeAmount;

    @ApiModelProperty(value = "赠送金额")
    private BigDecimal giftAmount;

    @ApiModelProperty(value = "商家备注")
    private String shopRemark;

    @ApiModelProperty(value = "状态:1-启用;0-停用;")
    private Integer status;

}
